<section class="container">
	<div class="well">
		<?$form = $this->beginWidget('application.widgets.ActiveForm', array(
			'enableClientValidation'=>true,
			'htmlOptions' => array (
				'class' => 'form-horizontal'
			)
		))?>
			<legend>注册</legend>
			<fieldset>
				<div class="row">
					<div class="span9">
						<div class="control-group <?=$member->hasErrors('email') ? 'error' : '';?>">
		                    <?=$form->labelEx($member, 'email', array('class' => 'control-label')); ?>
		                    <dd class="controls">
		                        <?=$form->textField($member, 'email', array('class' => 'input-large')); ?>
		                        <?=$form->error($member, 'email', array('class' => 'help-inline')); ?>
		                    </dd>
						</div>
						<div class="control-group <?=$member->hasErrors('username') ? 'error' : '';?>">
		                    <?=$form->labelEx($member, 'username', array('class' => 'control-label')); ?>
		                    <dd class="controls">
		                        <?=$form->textField($member, 'username', array('class' => 'input-large')); ?>
		                        <?=$form->error($member, 'username', array('class' => 'help-inline')); ?>
		                    </dd>
						</div>
						<div class="control-group <?=$member->hasErrors('password') ? 'error' : '';?>">
		                    <?=$form->labelEx($member, 'password', array('class' => 'control-label')); ?>
		                    <dd class="controls">
		                        <?=$form->passwordField($member, 'password', array('class' => 'input-large')); ?>
		                        <?=$form->error($member, 'password', array('class' => 'help-inline')); ?>
		                    </dd>
						</div>
						<div class="control-group <?=$member->hasErrors('confirmPassword') ? 'error' : '';?>">
		                    <?=$form->labelEx($member, 'confirmPassword', array('class' => 'control-label')); ?>
		                    <dd class="controls">
		                        <?=$form->passwordField($member, 'confirmPassword', array('class' => 'input-large')); ?>
		                        <?=$form->error($member, 'confirmPassword', array('class' => 'help-inline')); ?>
		                    </dd>
						</div>
						<div class="control-group">
				            <div class="controls">
				            	<?=CHtml::submitButton('注册', array('id' => 'registerBtn', 'class' => 'btn btn-wide btn-primary'))?>
				            </div>
				        </div>
					</div>
					<div class="span2">
						<div class="side">
							<p>已有账号?</p>
							<a class="btn btn-wide " href="<?=$this->createUrl('/member/login')?>">立即登录</a>
						</div>
					</div>
				</div>
			</fieldset>
		<?$this->endWidget()?>
	</div>
</section>
<?php 
$script = <<<EOF
Core.use('global', function(){
	//表单提交时按钮不可以用
	var registerBtn = $('#registerBtn');
	registerBtn.click(function(){
		Core.Util.btnDisable(registerBtn);
	});
});
EOF;
Yii::app()->clientScript->registerScript($this->id, $script);
Yii::app()->clientScript->registerLessFile(Yii::getPathOfAlias('views.layouts.less.') . '/' . $this->module->id . '.less');
?>